<!DOCTYPE html>
<html>

<head>
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Hello, World</title>
  <style type="text/css">
    #container {
      height: 100vh;
    }
  </style>
  <script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=2I6McaZte8jUuHxZvCTv6BuVMrPwXXYj"> </script>
</head>

<body>
  <div id="container"></div>
  <script type="text/javascript">
    // 3 创建地址解析器实例     
    var myGeo = new BMap.Geocoder();
    // 4 将地址解析结果显示在地图上，并调整地图视野    

    // 搜索 万达广场 
    // myGeo.getPoint("天河区津安创意园", function (point) {
    myGeo.getPoint("广州", function (point) { 
      if (point) {
        console.log(point);
      }
    },
    // 当前的城市
      "广州");
  </script>
</body>

</html>